project(tst_qtbase_benchmarks)

#引入add_module模板文件
include(${ISSQTTESTROOTDIR}/cmake/add_module.cmake)

#设置测试类型，auto为自动测试，manual为手动测试,即test目录下的文件夹名
set(TEST_TYPE benchmarks)
#设置模块名
set(MODULE qtbase)
#设置需要链接的模块
set(LinkQt Core Gui Widgets Network Concurrent OpenGL Sql Svg Quick Xml PrintSupport)
#设置需要链接的模块的私有模块
set(LinkQtPrivate Core Test Gui Widgets Sql Network OpenGL Concurrent PrintSupport)

set(CodeRootPath ${ISSQTTESTROOTDIR}/qtbase)

#设置排除的文件夹（相对TEST_TYPE的路径）
set(EXCLUDE 
		#private test
		network/kernel)

#多级目录（相对TEST_TYPE的路径）
set(TEST_ITEMS ${TEST_ITEMS}
	corelib
	gui
	network/access
	network/socket
)

#额外src.cpp（相对TEST_TYPE的路径）
add_sources(../auto/other/lancelot/paintcommands.cpp
          corelib/codecs/qtextcodec/main066.cpp
          corelib/io/qfileinfo/main069.cpp
          corelib/io/qiodevice/main070.cpp
          corelib/io/qtemporaryfile/main072.cpp
          corelib/io/qtextstream/main073.cpp
          corelib/io/qurl/main074.cpp
          corelib/kernel/events/main075.cpp
          corelib/kernel/qcoreapplication/main076.cpp
          corelib/kernel/qmetaobject/main077.cpp
          corelib/kernel/qobject/main078.cpp
          corelib/mimetypes/qmimedatabase/main079.cpp
          corelib/tools/containers-associative/main080.cpp
          corelib/tools/qbytearray/main082.cpp
          corelib/tools/qchar/main083.cpp
          corelib/tools/qcontiguouscache/main084.cpp
          corelib/tools/qcryptographichash/main085.cpp
          corelib/tools/qdatetime/main086.cpp
          corelib/tools/qhash/main087.cpp
          corelib/tools/qlist/main088.cpp
          corelib/tools/qlocale/main089.cpp
          corelib/tools/qmap/main090.cpp
          corelib/tools/qrect/main091.cpp
          corelib/tools/qregexp/main092.cpp
          corelib/tools/qringbuffer/main093.cpp
          corelib/tools/qset/main094.cpp
          corelib/tools/qstack/main095.cpp
          corelib/tools/qstring/main096.cpp
          corelib/tools/qstringbuilder/main097.cpp
          corelib/tools/qstringlist/main098.cpp
          corelib/tools/qtimezone/main099.cpp
          corelib/tools/qvector/main100.cpp
          gui/animation/qanimation/main101.cpp
          gui/image/blendbench/main102.cpp
          gui/painting/qregion/main103.cpp
          gui/text/qfontmetrics/main104.cpp
          gui/text/qtext/main105.cpp
          gui/text/qtextdocument/main106.cpp
          network/access/qfile_vs_qnetworkaccessmanager/main107.cpp
)

#排出不需要的.cpp（相对TEST_TYPE的路径）
set(EXCLUDE_SRC ${EXCLUDE_SRC}
    gui/painting/qtbench/tst_qtbench.cpp                       #SIGABRT(SI_TKILL)(ASSERT: "id != WId(0)" in file E:/GitResp/qt5/qtbase/src/widgets/kernel/qwidget.cpp)
    network/access/qnetworkreply/tst_qnetworkreply.cpp         #define QT_NO_SSL

    corelib/thread/qwaitcondition/tst_qwaitcondition.cpp     #timeout(QThread::wait)
)

set(PLUGINS QOpenHarmonyPlatformIntegrationPlugin)

#再把TEST_ITEMS传给create_library整合测试项，生成测试库
#整合测试项，生成测试库，名字当前工程名，即project(tst_qtcharts_auto)中定义的tst_qtcharts_auto
create_library(${TEST_ITEMS})

